package com.basic.aqs;

import java.util.concurrent.CountDownLatch;

public class CountDownLatchTest {

	private final static CountDownLatch COUNTDOWNLATCH = new CountDownLatch(1);
	
	public static void main(String[] args) {
		new Thread(new Runnable() {
			
			public void run() {
				try {
					Thread.sleep(10000);
				} catch (InterruptedException e) {
					e.printStackTrace();
				}
				System.out.println("已经释放了！");
				COUNTDOWNLATCH.countDown();
			}
		}).start();
		try {
			COUNTDOWNLATCH.await();
		} catch (InterruptedException e) {
			e.printStackTrace();
		}
	}
	

}
